using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;

namespace Rest.Xml
{
    /// <summary>
    /// Default RestServiceXmlSchema
    /// </summary>
    class DefaultRestServiceXmlSchema : IRestServiceXmlSchema
    {
        /// <summary>
        /// Identifies an error Response
        /// </summary>
        /// <param Name="xmlDocument"></param>
        /// <returns></returns>
        public Boolean IsErrorResponse(XmlDocument xmlDocument)
        {
            return String.Compare(xmlDocument.DocumentElement.Name, "error", true).Equals(0);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="xmlDocument"></param>
        /// <returns></returns>
        public String GetExceptionMessage(XmlDocument xmlDocument)
        {
            throw new NotSupportedException();
        }
    }
}
